#!/usr/bin/env python
# -*- conding: utf-8 -*-

"""
@Time     : 2024/8/22 7:21
@Author   : liujingmao
@File     : create-speech.py
"""

import dotenv
import openai

dotenv.load_dotenv()

speech_file_path = "./speech.mp3"
response = openai.audio.speech.create(
    model="tts-1",
    voice="alloy",
    input="The quick brown fox jumped over the lazy dog."
)
response.stream_to_file(speech_file_path)
